import 'package:flutter/widgets.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:fristflutter/src/framework/app_start_action.dart';
import 'package:fristflutter/src/framework/bloc.dart';

class AppStartScope extends StatelessWidget {
  final AppStartAction appStartAction;

  final Widget child;

  const AppStartScope({
    super.key,
    required this.appStartAction,
    required this.child,});

  @override
  Widget build(BuildContext context) {
    return BlocProvider(
      lazy: false,
      create: (context) => AppStartBloc(
        appStartAction: appStartAction
      )..startApp(),
      child: child,
    );
  }

}